#include <stdio.h>

void main(){
    char a[13];
    int sum=0;
    scanf("%s",&a);
    
    int b=1;
    for (int i=0;i<11;i++){
        if (a[i]!='-'){
            sum+=(a[i]-'0')*b;
            
            b++;
        }
    }
    int judge=sum%11;
    
    char c[11]={'0','1','2','3','4','5','6','7','8','9','X'};
    if (c[judge]==a[12]){
        {printf("Right\n");}
        
    }
    else{
        for (int i=0;i<12;i++){printf("%c",a[i]);}
        printf("%c\n",c[judge]);
    }
    

}